# Contributor: Gaber Ayoubi <gaber.ayoubi@gmail.com>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=dwm
pkgver=6.2
pkgrel=0
pkgdesc="dwm - dynamic window manager"
url="https://dwm.suckless.org"
arch="all"
license="MIT/X"
depends="dmenu st"
makedepends="libxft-dev libx11-dev libxinerama-dev"
subpackages="$pkgname-doc"
source="https://dl.suckless.org/dwm/dwm-$pkgver.tar.gz"

prepare() {
	default_prepare
	sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \
		-e '/LDFLAGS/{s/=/+=/}' \
		"$builddir"/config.mk
}

build() {
	make X11INC=/usr/include/X11 \
		X11LIB=/usr/lib/X11 \
		FREETYPEINC=/usr/include/freetype2 \
		-C "$builddir"
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" \
		-C "$builddir" install
}

sha512sums="01abcab954e5b7c20d011e6fd9c28025271fea2e85610c928812f7c6a09f99d7f9e93d11ffc2d6a7aca894b3fa7e507c6c2fe5f26ff5ddcfc650a9bbaaa41e06  dwm-6.2.tar.gz"
